<include file="Public:header" />
<tagLib name="html" />
<style type="text/css">
     .wrap-word{word-wrap:break-word;}
     td {
          white-space: pre-wrap;       /* css-3 */
           white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
            white-space: -pre-wrap;      /* Opera 4-6 */
             white-space: -o-pre-wrap;    /* Opera 7 */
              word-wrap: break-word;       /* Internet Explorer 5.5+ */
     }
</style>
<div id="main" class="main" >
<!-- 主体内容  -->
<div class="content" >
<!--  功能组区域  -->
<div class="btn-toolbar">
	<div class="btn-group">
		<button class="btn btn-primary" onclick="import_order()"> <i class="icon-share-alt  icon-white"></i>导入订单</button>
		<button class="btn btn-success" onclick="send_message()"> <i class="icon-envelope  icon-white"></i>短信催付</button>
	</div>
		导出
		<a href="__URL__/export_order?{$parameters}&etype=order&action={:ACTION_NAME}" class="btn">订单</a>
		<span class="label label-success">总待付款:{$sum_should_pay}</span>
		<span class="label label-warning">待催付:{$count_to_send}</span>
	<form class="search-form" method='get' action="__URL__">
		来源{:modList( 'Order_source',$_REQUEST['order_source_id'],'span1', 'order_source_id' )}
        是否催付 <select id="noticed" name="noticed" class="span1">
              <option value="0" <eq name="_REQUEST.noticed" value="0">selected</eq> >未催付</option>
              <option value="1" <eq name="_REQUEST.noticed" value="1">selected</eq>>已催付</option>
        </select>
		运单<input type="text" class="search-query span2" name="logino" <notempty name='_REQUEST.logino'>
		<php>echo 'value="'.urldecode($_REQUEST['logino']).'"'</php>
		<else/>
		placeholder="运单号" </notempty> >
	   收货人<input type="text" class="search-query span2" name="shipping_name" <notempty name='_REQUEST.shipping_name'>
		<php>echo 'value="'.urldecode($_REQUEST['shipping_name']).'"'</php>
		<else/>
		placeholder="收货人" </notempty> >

	   手机<input type="text" class="search-query span2" name="mobile" <notempty name='_REQUEST.mobile'>
		<php>echo 'value="'.urldecode($_REQUEST['mobile']).'"'</php>
		<else/>
		placeholder="手机" </notempty> >

	   买家<input type="text" class="search-query span2" name="customer_name" <notempty name='_REQUEST.customer_name'>
		<php>echo 'value="'.urldecode($_REQUEST['customer_name']).'"'</php>
		<else/>
		placeholder="买家" </notempty> >

	订单号
	<input type="text" class="search-query span2" name="order_no" <notempty name='_REQUEST.order_no'>
		<php>echo 'value="'.urldecode($_REQUEST['order_no']).'"'</php>
		<else/>
		placeholder="按订单号搜索"
	</notempty>
	>
    <!--Advaced Search-->
     <div  id="searchM" class=" none search cBoth" >
		每页显示 <input type="text" class="span1" name="listRows" value="{$_REQUEST.listRows}">
		{:configList( C('orderStatus'),$_REQUEST['order_status'],'order_status','span1' )}
		
		<select name="status" class="span1"> 
			<option value="">--审核状态--</option>
			<option value="1" <eq name="_REQUEST.status" value="1">selected</eq> >审核通过</option> 
			<option value="0" <eq name="_REQUEST.status" value="0">selected</eq> >待审核</option> 
		</select>

		备注<input type="text" class="search-query span2" name="remark" <notempty name='_REQUEST.remark'>
		<php>echo 'value="'.urldecode($_REQUEST['remark']).'"'</php>
		<else/>
		placeholder="备注" </notempty> >

	   地址<input type="text" class="search-query span2" name="address" <notempty name='_REQUEST.address'>
		<php>echo 'value="'.urldecode($_REQUEST['address']).'"'</php>
		<else/>
		placeholder="地址" </notempty> >


	   电话<input type="text" class="search-query span2" name="phone" <notempty name='_REQUEST.phone'>
		<php>echo 'value="'.urldecode($_REQUEST['phone']).'"'</php>
		<else/>
		placeholder="电话" </notempty> >

		<select name="time_type" class="span1"> 
			<option value="">--时间类型--</option>
			<option value="1" <eq name="_REQUEST.time_type" value="1">selected</eq> >审核时间</option> 
			<option value="2" <eq name="_REQUEST.time_type" value="2">selected</eq> >发货时间</option> 
			<option value="3" <eq name="_REQUEST.time_type" value="3">selected</eq> >下单时间</option> 
			<option value="4" <eq name="_REQUEST.time_type" value="4">selected</eq> >支付时间</option>
		</select>
		从<input type="text" class="span2"  name="start_time" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="<notempty name='_REQUEST.start_time'>{$_REQUEST.start_time}</notempty>">
		到<input type="text" class="span2" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" name="end_time" id="end_time" value="<notempty name='_REQUEST.end_time'>{$_REQUEST.end_time}</notempty>" >
		产品<input type="text" class="search-query span2" name="keywords" <notempty name='_REQUEST.keywords'>
		<php>echo 'value="'.urldecode($_REQUEST['keywords']).'"'</php>
		<else/>
		placeholder="产品"
	</notempty> >

	模糊订单号
	<input type="text" class="search-query span2" name="like_order_no" <notempty name='_REQUEST.like_order_no'>
		<php>echo 'value="'.urldecode($_REQUEST['like_order_no']).'"'</php>
		<else/>
		placeholder="按订单号模糊搜索"
	</notempty>
	>
     </div>
	<input type="submit" class="btn btn-primary input-middle" value="搜  索">
    <a class="btn btn-info" onclick="showHideSearch()" href="javascript:void(0)" ><i class="icon-chevron-down icon-white"></i> 更多</a>
	</form>
	
</div>
<!-- 功能组区域结束 -->
<!-- 列表显示区域  -->
<div class="list" >
<div id="result" class="result none"></div><html:list id="checkList" pk="id" action="true" style="table table-bordered table-striped" checkbox="true"  datasource="list" show="id:编号|4%:edit,sale_no:订单号:edit,noticed|getFinishStatus:已发送,address:地址,should_pay:应收款,sum_number:总数,shipping_name:收货人,mobile:手机,customer_msg|cutstr=50:客户留言|10%,order_status|getConfigVal=orderstatus:订单状态,remark|cutstr=50:备注商品|10%,create_time|toDate:下单时间,order_source_id|getModelName='Order_source':订单来源" actionlist="edit:详情:id"/>
</div>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>
<include file="Public:footer"/>
<load href="__PUBLIC__/Js/My97DatePicker/WdatePicker.js" />
<script type="text/javascript">
  function import_order(){
    location.href= APP+'/Sale_topay/tbimport';
 }

 function send_message(id){
 	var keyValue = (id)? id : getSelectCheckboxValues();
	if (keyValue=='')
	{
		alert('请选择订单！');
		return false;
	}
        window.open( URL+"/send_message/id/"+keyValue , '_blank' );
 }
</script>
